#import <Cocoa/Cocoa.h>


@interface RNSearchMenuView : NSView {
    id delegate;
    NSInteger selectedRow_;
    NSRect selectedRowRect_;
    NSMutableArray *menuItems_;
    NSBezierPath *borderPath_;
    NSDictionary *defaultTextAttributes_;
    NSDictionary *selectedTextAttributes_;
    BOOL trackingMouseClick_;
    SEL action_;
    id target_;
}

@property (assign) IBOutlet id delegate;
@property (assign) NSInteger selectedRow;
@property (assign) NSRect selectedRowRect;
@property (retain) NSMutableArray *menuItems;
@property (retain) NSBezierPath *borderPath;
@property (retain) NSDictionary *defaultTextAttributes;
@property (retain) NSDictionary *selectedTextAttributes;
@property (assign) BOOL trackingMouseClick;
@property (assign) SEL action;
@property (assign) id target;

-(void)update;
-(void)drawSelectionHighlight;
-(NSRect)rectOfRow:(NSUInteger)rowIndex;
-(void)drawRowsInRange:(NSRange)dirtyRects;
-(CGFloat)preferredHeight;
-(NSString *)itemTitleAtIndex:(NSUInteger)itemIndex;
-(BOOL)isSeparatorAtIndex:(NSUInteger)itemIndex;
-(BOOL)isValidIndex:(NSUInteger)itemIndex;

@end

@interface NSObject (RNSearchMenuViewProtocol)
-(NSUInteger)numberOfItemsInMenu;
-(id)itemTitleAtIndex:(NSUInteger)itemIndex;
@end

